
public class Fibzclass
{
	public static int fibo(int N)
	{
		int i=1;
		int j=1;
		int p=0;
		if (N==1||N==2)
		{
			return 1;
		}
		else
		{
			for(int k=3; k<=N; k++)
			{
				p=i+j;
				i=j;
				j=p;
			}
			return(p);
		}
	}

	public static void main(String[] args)
	{
		long start = System.nanoTime();
		System.out.println(fibo(6));
		long end = System.nanoTime();
		long traceTime = end-start;
		System.out.println(traceTime);

	}

}
